<!DOCTYPE html>
<html>
<head>
  <title><%= site_name %></title>
  <link rel="shortcut icon" href="/assets/favicon.ico" />

  <%= stylesheet_link_tag "normalize.css" %>
  <%= stylesheet_link_tag "application.css" %>
  <%= stylesheet_link_tag 'admin/app.css' %>
  <!--[if lt IE 8]
    <%= stylesheet_link_tag "admin/ie.css" %>
  <![endif]-->
  <%= csrf_meta_tag %>

  <%= javascript_include_tag 'application' %>
  <%#= javascript_include_tag "admin/app" %>
  <%#= javascript_include_tag "admin/jquery.customforms" %>
  <%#= javascript_include_tag "admin/jquery.placeholder.min" %>
  <%#= javascript_include_tag "admin/jquery.reveal" %>
  <%#= javascript_include_tag "admin/jquery.tooltips" %>
  <%#= javascript_include_tag "admin/modernizr.foundation" %>

  <link rel="stylesheet" href="http://cdn.oesmith.co.uk/morris-0.4.3.min.css">

  <script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
  <script src="http://cdn.oesmith.co.uk/morris-0.4.3.min.js"></script>

  <%= yield :head %>
</head>
<body class="bp">
  <div class="container">
    <div class="row">
      <% if notice || alert %>
          <div class="flash_notice callout <%= !!alert ? 'alert' : 'warning' %>" data-closable>
            <div>
            <% if alert %>
              <%= alert %>
            <% elsif notice %>
              <%= notice %>
            <% end %>
            </div>
            <button class="close-button" aria-label="Close alert" type="button"  data-close>
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
      <% end %>

      <%= render :partial => "shared/admin/header_bar" %>

      <% if content_for? :header_sub_bar %>
        <div id='header_sub_bar'>
          <%= yield :header_sub_bar %>
        </div>
      <% end %>

      <% if content_for?(:sidemenu) %>
        <div class="admin_main_content large-9 columns">
          <%= yield %>
        </div>
        <div class="large-3 columns sidebar" >
          <%= yield :sidemenu %>
        </div>
      <% else %>
        <div class='admin_main_content'>
          <%= yield %>
        </div>
      <% end %>
    </div>
    <div class="footer">
      <p class="left"><%= site_name %></p>
      <p class="right">Powered by <%= link_to "RoR eCommerce", "http://ror-e.com" %>. v<%= RoReCommerce::Version %></p>
    </div>
  </div>

  <%= yield :bottom %>

  <script>
  jQuery(window).ready(
    function() {
      jQuery('.flash_notice').delay(6000).slideUp( 'slow');
      jQuery('.flash_error').delay(6000).slideUp( 'slow');
    }
  );
  </script>

</body>
  <%= yield :below_body %>
</html>
